#include "junix.h"

static char * 
human_time (time_t const *t)
{
  static char str[80];
  struct tm *tm = localtime (t);
  if (tm == NULL)
  {
      return (char *) ("*** invalid date/time ***");
  }

  strftime (str, sizeof(str), "%Y-%m-%d %H:%M:%S", tm);

  return str;
}

int main(int argc, char **argv)
{
	time_t t=time(NULL);
	printf("%s\n",human_time(&t));
	return 0;
}

